package version1;

public class Deposit extends Operation{
	private BankDatabase accounts;
	private Screen screen;
	private int currentAccountNumber;
	private Keypad input;
	@SuppressWarnings("unused")
	private DepositSlot slot;
	
	public Deposit(int currentAccountNumber, Screen screen,
			BankDatabase bankDatabase, Keypad keypad, DepositSlot depositSlot) {
		accounts = bankDatabase;
		this.currentAccountNumber = currentAccountNumber;
		this.screen = screen;
		input = keypad;
		slot = depositSlot;
	}

	@Override
	public void Execute(int valMachine) {
		screen.ShowMessage("Quanto deseja depositar?");
		int amount = input.ReadInt();
		accounts.Credit(currentAccountNumber, amount);
	}
}
